import { RouteRecordRaw } from "vue-router";
import { Layout } from "@/router/constant";
import { renderIcon } from "@/utils/renderComponent/iconRender";
import { DashboardOutlined } from "@vicons/antd";

const routeName = "dashboard";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/dashboard",
    name: "dashboard",
    component: Layout,
    meta: {
      title: "Dashboard",
      sort: 0,
      icon: renderIcon(DashboardOutlined),
    },
    children: [
      {
        path: "analysis",
        name: `${routeName}_analysis`,
        component: () => import("@/views/dashboard/analysis/AnalysisIndex.vue"),
      },
      {
        path: "work-bench",
        name: `${routeName}_work_bench`,
        component: () =>
          import("@/views/dashboard/work-bench/WorkBenchIndex.vue"),
      },
    ],
  },
];

export default routes;
